Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I re-did the output escaping as I was originally double escaping some output.
One issue we may have is with late escaping. You escape quite a bit of output early, and so it looks like the output isn't escaped on echo. This doesn't present a security problem in itself, but VIP dislikes it as it's easy to miss something in the future. Their explanation is here: https://vip.wordpress.com/2014/06/20/the-importance-of-escaping-all-the-things/
I'm not sure if this will end up being a blocker, but it's something to consider.
For now, I've left escaping where it is, and added it in places I did not see it escaped prior.
I did a manual QA: adding all the components pre- and post-escaping and the diff passed. But I'm not as familiar with this as you are, so it's worth another check.